#ifndef MESH_REFINE_H
#define MESH_REFINE_H

#include <vector>

constexpr int SUCCESS = 0;

namespace Mesher {

    using Real = double;

    struct Node {
        Real x;
        Real y;
        Real z;
    };

    struct Tria {
        int node[3];
        int id{ 0 };
    };

    struct Tetr {
        int node[4];
        int boud[4];
        int id{ 0 };
    };
    // Refine a triangle mesh
    int RefineMesh(std::vector<Node> &vR, std::vector<Tria> &vElem, std::vector<bool> &vRefine);
    // Refine a tetrahedra mesh
    int RefineMesh(std::vector<Node> &vR, std::vector<Tetr> &vElem, std::vector<bool> &vRefine);
}



#endif
